# $Id: PKGBUILD 80989 2012-12-08 18:35:12Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Geoffroy Carrier <geoffroy.carrier@aur.archlinux.org>
# Contributor: Nathan Jones <nathanj@insightbb.com>

pkgname=python2-memcached
pkgdesc='Python interface to memcached'
pkgver=1.48
pkgrel=4
depends=('python2')
url='https://bugs.launchpad.net/python-memcached'
arch=('any')
license=('Python')
makedepends=('python2-distribute')
source=("ftp://ftp.tummy.com/pub/python-memcached/python-memcached-$pkgver.tar.gz"
        'LICENSE')
sha256sums=('66bbc62d9519f9d531b1f77e687d9f2f5e521cb906f1fd7231f403997e0110c4'
            '9f3f9438250f8aa5bdcbb0dee700f237932fbda985646c61c85d2a25a2510f36')

package() {
  cd $srcdir/python-memcached-$pkgver

  sed -i 's:/usr/bin/env python:#/usr/bin/python2:' memcache.py
  python2 setup.py install --root=$pkgdir --optimize=1
  install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

check() {
  cd $srcdir/python-memcached-$pkgver

  python2 setup.py check
}

# vim:set ts=2 sw=2 et:
